import request from '@/utils/request'

// 创建桶
export const bucketsCreateService = ({ name }) => {
  return request.post('/op/buckets', name, { headers: { 'Content-Type': 'text/plain' } })
}

// 删除桶
export const bucketsDeleteService = (name) => {
  return request.delete(`/op/buckets/${name}`)
}

// 修改桶
export const bucketsUpdateService = (bucket) => {
  return request.put('/op/buckets', bucket)
}

// 获取桶列表
export const bucketsGetListService = () => {
  return request.get('/op/buckets')
}

// 获取桶的summary信息
export const bucketGetSummaryService = (name) => {
  return request.get(`/op/buckets/summary/${name}`)
}
